package com.atguigu.spring5.service;

import com.atguigu.spring5.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @date: 2021/12/9 14:55
 * @description:
 */
@Service
@Transactional
public class UserService {
    @Autowired
    private UserDao userDao;


    public void accountMoney(Object[] reduce,Object[] add){
        //------------
        userDao.reduceMoney(reduce);

        int a=100/0;
        //++++++++++++
        userDao.addMoney(add);

    }
}
